cellrendererpixbuf: Use new snapshot transforms
authorBenjamin Otte <otte@redhat.com>
Thu, 21 Feb 2019 04:34:12 +0000 (05:34 +0100)
committerBenjamin Otte <otte@redhat.com>
Thu, 21 Feb 2019 18:47:28 +0000 (19:47 +0100)
gtk/gtkcellrendererpixbuf.c

index 37e81672034cd7ed4932753560a5c815de1ff8cb..d9349a5488f6b4f85b1ae2154f8f22a95e2c901c 100644 (file)
@@ -554,9 +554,10 @@ gtk_cell_renderer_pixbuf_snapshot (GtkCellRenderer      *cell,
       icon_helper = create_icon_helper (cellpixbuf, widget);
     }
 
-  gtk_snapshot_offset (snapshot, pix_rect.x, pix_rect.y);
+  gtk_snapshot_save (snapshot);
+  gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (pix_rect.x, pix_rect.y));
   gdk_paintable_snapshot (GDK_PAINTABLE (icon_helper), snapshot, pix_rect.width, pix_rect.height);
-  gtk_snapshot_offset (snapshot, - pix_rect.x, - pix_rect.y);
+  gtk_snapshot_restore (snapshot);
 
   g_object_unref (icon_helper);
   gtk_style_context_restore (context);